import ChartForm from "../ChartForm/ChartForm";
import { AxisChartForm, ChartFormContext } from "../ChartForm/index";
import { EChartType, ESubAxisChartType } from "../core/ChartType";

export default function AxisFormFactory(subChartType?: number) {
    const axisFormContext = new ChartFormContext(new ChartForm(AxisChartForm, false))
    // const axisFormContext = new ChartFormContext(new AxisChartForm())
    axisFormContext.setFormState("chartType", EChartType.AxisChart);
    axisFormContext.setFormState("subChartType", subChartType || ESubAxisChartType.Line);
    return axisFormContext;
}